@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Inter:wght@300;400&family=Dancing+Script:wght@600;700&family=Mulish:wght@400;600&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle, #0d0f1d, #000);
  overflow: hidden;
  font-family: "Inter", sans-serif;
  color: #fff;
}

.sky {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* FIREWORK CANVAS */
#fw {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ===================== */
/* YEAR TEXT */
/* ===================== */
.year {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding-top: clamp(2rem, 8vh, 6rem);
  width: 100%;

  font-family: "Dancing Script", cursive;
  font-size: clamp(10rem, 100vw, 11rem);
  letter-spacing: clamp(0.02em, 0.3vw, 0.12em);
  text-align: center;

  opacity: 0;
  transform: scale(0.75);
  transition: opacity 1.8s ease, transform 2s ease;
  z-index: 2;
}

.year.show {
  opacity: 1;
  transform: scale(1);
}

/* Move year upward (fluid) */
.year.shift-up {
  transform: translateY(clamp(-10vh, -12vw, -18vh)) scale(1);
}

/* ===================== */
/* GRADIENT TEXT */
/* ===================== */
.gradient-text {
  background: linear-gradient(
    90deg,
    #fff8e1,
    #ffe082,
    #ffca28,
    #ffc107,
    #ff9800,
    #ff6f00
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* ===================== */
/* WISH TEXT */
/* ===================== */
.wish,
.wish2 {
  position: absolute;
  width: 100%;
  text-align: center;
  opacity: 0;
  z-index: 2;

  transition: opacity 2s ease, transform 3s ease;
  padding-inline: 1rem;
}

.wish {
  bottom: clamp(8%, 15vh, 20%);
  font-family: "Dancing Script", cursive;
  font-size: clamp(1rem, 3.5vw, 1.8rem);
}

.wish2 {
  bottom: clamp(8%, 6vh, 8%);
  font-family: "Mulish", sans-serif;
  font-size: clamp(0.95rem, 3vw, 1.6rem);
}

.wish.show,
.wish2.show {
  opacity: 1;
  transform: translateY(clamp(-8vh, -10vw, -14vh));
}

/* Extra upward movement when Pudgy appears */
.wish.shift-up,
.wish2.shift-up {
  transform: translateY(clamp(-16vh, -20vw, -28vh));
}

/* ===================== */
/* PUDGY IMAGE */
/* ===================== */
.pudgy {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 5;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.pudgy img {
  width: min(90vmin, 520px);
  height: auto;
  object-fit: contain;
}

/* ===================== */
/* FLASH EFFECT */
/* ===================== */
.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.flash.show {
  opacity: 1;
}

.flash.hide {
  opacity: 0;
}

.hidden {
  display: none;
}

/* ===================== */
/* SMALL DEVICES */
/* ===================== */
@media (max-width: 480px) {
  .year {
    padding-top: 2.5rem;
    font-size: clamp(2.5rem, 14vw, 5rem);
  }

  .wish,
  .wish2 {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
  }
}
